Moving test permutations code to the DatabaseSuite, fixed identifier quoting errors

I figured identifier quoting tests were not running, this brings them back. Fixed some errors found on that feature