Maxcoin branch fixes

I've not yet got this compatible with other coins but this PR makes some considerable improvements on how logging is handled and also fixes issues due to usage of the deprecated `max_hash` library.