clean POST of unwanted characters

Clean input from control characters (low bits in ASCII table).

In case of UTF-8 encoding, strip also Unicode characters over 3 bytes as
MySQL 'utf8' encoding does not support it and truncates input in place
of such Unicode character.

Better solution exists, but requires MySQL 5.5.3 and converting database
encodings to 'utf8mb4'

http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
http://stackoverflow.com/questions/8491431/remove-4-byte-characters-from-a-utf-8-string