Add infrastructure for creating a block template.

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