Implemented more shared code, especially DLL-related.
Unified some differences between sp and mp, fixed some incorrect types in CommonLib
Cleaned up SP DLL code; Renamed main to ojk_main since stuff like SDL may redefine main.