Thinking about refinancing your mortgage? Here's what you need to consider.