tidy
renamed conn_max to max_conn
added shuffle option
added tests for guess_encoding
safer charset detection