Clang compatibility

* Separated sqlite3.c into a static library that PKMDS links against
* Removed implicit casts from strongly-typed enums

The sqlite3.c stuff obviously only applies to CMake builds. Clang threw an error when I tried to apply the -std=c++11 flag to a C source file (GCC only threw a warning for its equivalent), so I had to separate it out from the rest. The explicit casts didn't look to break anything, but test it with the Qt app under MSVC to be sure.