parser: factor out named object block parsing
parser: factor out named object block parsing

Previously the circuit parser had all of the block-wrangling logic inside.
We're going to have more blocks similar to circuit, so here we factor
this out so we can call it from other parsers.

cirbo-lang/cirbo,cirbo-lang/cirbo,cirbo-lang/cirbo