Fixing numerous warnings and errors in manaplus
closes #121