[#1374] fix datastore _read_connection_has_correct_privileges

remove the read connection, and use the write connection with the
username of the read connection to test if the priviliges are correct
[#1374] refactor datastore _read_connection_has_correct_privileges()

 * remove nested try statement
 * use make_url instead of splicing the string for _get_db_url()
[#1374] add host and port to _get_db_from_url
[#1374] datastore:rename variable to avoid confusing name clash
[#1374] datastore:use bind params instead of string formatting
Merge pull request #1397 from ckan/1374-datastore-use-temp-table

1374 Fix Datastore loading/startup bug