Sort HTML attributes by key

HTML attributes are backed by a Go map, and since Go 1 the iteration order has been random.

This is not a problem for the browsers, but is a problem when using changed content as a way of detecting which files to deploy to a server.

This commit fixes that by ordering by attribute key.

Fixes #37