entity/header parsing fixes

headers no longer use preserve-case (was creating upper-case <h[0-9]>
tags, which also pointed out a problem in the entity parsing

entitiy parsing now allows uppercase HTML tags and attribute names. it
also now looks for numbered entities: &#69; (before it was only looking
for non-numbered entities).