XML validity.
Toolbar insertion test for middleware

Byte counts of "İ" and "İ".lower() are different.  If the page html
contains "İ", process_response() method cannot insert the toolbar
content at the correct index, and breaks the page content.
Adjust toolbar insertion code to avoid .lower().

Fix #531.