Added support for GetBlockTemplate

The miner will now use getblocktemplate/submitblock instead of getwork
when used in combination with primecoind. Additionally solo miners need
to specify the XPM address via the -xpm parameter.