Some cleaning up of host code generation

* c_map_name takes an optional argument indicating whether we want
  the row (0) or column map (1) for a Mat.
* Increment extruded maps by the offset for each layer rather than
  recomputing each time.