Add infrastrcuture for creating a block template.

This pull request add a new subsystem for mining related ops, options to control block creation settings, and infrastructure for creating a block template.