make keystore PostgreSql friendly, and clean up code to avoid using db-specific column naming
NOTE: this is an initial attempt, and may have race condition issues for the upset when using postgres.
stop using db-specific column name quotes
removing db-specific boolean usage, replacing by using activerecord::base's quoted_false and quoted_true functions