Replace sorted map with slice for HTML attributes

For cleaner code and performance reasons.

See #38
Fixes #39
Merge pull request #40 from bjornerik/improve/slice-for-attributes

Replace sorted map with slice for HTML attributes