Validation part fix. Fixes #5322

I added adittional function, which can be reused somewhere else also.
I grepped and it is much more places where isinstance(temp, str) is called.
So it must be fixed also on all other places.
This part is enough for crabserver, will check later sitedb.

As previuosly I said to change it to basestring, it did not worked, when I was submitting/quering status. I am using current production crabserver code, and wmcore code. Please feel free to comment, suggest, blame ;)

@geneguvo @mmascher @ericvaandering @amaltaro @bbockelm 
Thank Andrew, I didn't even thought about that. Now I was just wondering what _check_str() supposed to do?
Is it verifying whether input is ASCII? Or does this function supposed to change unicode to str if possible?
I guess it wasn't intended to convert unicode. But was this changed to this way to work with cherrypy 3.2.2 and existing code?