Added minimal requirements checking.

Extra metadata on the multicore/ipythontask functions
under {"resources": {"ensure": "prog": fn}} can specify
a function which takes cores_per_job and memory_per_core
as arguments and sets them to the minimal requirements
for that tool if they do not meet them.

Fixes a bug with not allocating enough memory to
Tophat.