(PUP-2794) Add support for Optional and Variant as Callable
This adds support for a callable block to be specified using
Optional or Variant, as long as any actual type is a Callable.
I.e. in the Function API, it is possible to write:
required_block_param 'Variant[Callable[1,1], Callable[2,2]]', :block
If the function will invoke the block with either exactly one or
exactly two parameters (and when no type is specified, the type is the
internal Unit (don't care).