Initial merge of CMaNGOS changes into MaNGOS Two

This contains roughly half of the patches from cmangos needed to catch up to their latest revision for compatibility with spells, sd2 and databases such as udb and ytdb.
The other half will be coming soon!