Bug 53146: Percent-encode fragment identifiers too

We were only encoding the title part of a title URI. Also encode the fragment
id part.

Change-Id: I96d3679f027de620ef4891c8519934de4f701b7f