As mortgage rates rise, how to decide whether to buy a home or rent