Fix for bold and italic buttons not staying highlighted when nothing is selected, and there is no text.

This is somewhat strange, when there is no text in the TextView, the attributedText length is 1. So these changes reflect that so that if there is no text, or you are at the end of the string, tapping bold or italic will keep those highlighted.
Merge pull request #7 from jvanmetre/bold-italic-highlighting

Fix for bold and italic buttons not staying highlighted when nothing is selected, and there is no text.