twisted.web: replace calls to string module's function to string method

Fixes: #5004
Remove unused imports
Improve test coverage for twisted.web.twcgi.CGIScript's render method
Improve test coverage of twisted.web.util.htmlIndent
Cosmetic on test names
Replace usage of str.find() by str.index()

As suggested by lvh in
http://twistedmatrix.com/trac/ticket/5004#comment:17