Expand character references

This does not attempt to implement all the edge cases specified in http://www.w3.org/TR/2011/WD-html5-20110113/tokenization.html#tokenizing-character-references but just an approximation as it exists currently in the htmlbars repo.