Final merge of CMaNGOS changes

Finishes the work of the last pull request.
Notes: Core is compatible with new UDB release, however their update pack must be patched to edit any occurrences of the string `scripted_event_id` into `scripted_event`.
Also the core has only been built on a unix system, the Visual Studio files will not build mangos with the changes from this PR. I recommend using cmake to convert the cmake system into visual studio sln files.