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 
I think that originally the idea was "check this byte stream contains only ascii representable chars and matches a regexp", while check_ustr meant "check this byte stream can be decoded using utf-8 and matches a regexp that may contain any unicode chars".

Yes, it was changed this way to work with both cherrypy 3.2.2 and the old version. Our code calling check_str assumes to get a str after validation, while an unicode object from check_ustr. That's why we force the conversion.

I think long term we would get rid of ustr, return unicode on str, and make sure all our code using it from there on handles unicode properly.