Add docstring for quotefordtd()
Remove call to singlequotestr() in quotefordtd()
Remove unnecessary if clause in quotefordtd()
Remove singlequotestr() since it is not used anymore

Also remove escapesinglequotes() which is only used in singlequotestr()
Remove calls to quotestr()
Remove quotestr() since it is not necessary anymore

Also remove escapequotes() and quotestr() tests.
Split line to make code more readable
Fix % character escaping

Added more escapes for % and changed the preferred escape to &#037;
Fix in test_quotedtd() when testing % character escaping
Decorating test_invalid_quoting() with xfail
Add simple functional test for format
Add ## active ## flag handling

We understand the active flag so can parse it as needed. By default we'll
leave iin its current state.
Split up tests for quotefordtd() and unquotefromdtd()
Add commented code for escaping and unescaping < and > characters
Add new asserts in test_unquotefromdtd()
Add assert in test_quotefordtd() for checking singlequoting around string
Add docstring to test_quoteforandroid()
Change assert in test_quoteforandroid() for checking new behavior
Add test_unquotefromandroid() test
Replace ' chars with \u0027 in Android DTD