Improve support for escape sequences in attribute selectors

Partial fix for issue #86, including test case

I added an utility function that should help with implementing these tweaks for other identifiers (class, id, pseudo, tag name).  But I am not spending time on these for now.