Ver.1.4 by max

Working patch to fix PoW mining in official verison + some minor fix and additions.
Patch activation delayed to block #425000. Replace to any required mark if needed.