Only call the htmlentity production if there's an ampersand

The htmlentity production is called very often from the urltext production
(about 90% of calls), and accounts for 1.3% of the total cpu time when parsing
Obama. 

Only call it when there is actually an ampersand, and reorder directive
alternatives by how common they are.

Change-Id: I488f6efde07c5de2253f429051c44990a6278d40