Rewrite _map_cache to avoid np.in1d and where.

The resulting code appears to just disappear from the profiles.

Also take the opportunity to refactor slightly so that extruded is no
longer a special case in boundary map construction.
Merge pull request #290 from firedrakeproject/boundary_efficiency

Rewrite _map_cache to avoid np.in1d and where.

Also take the opportunity to refactor slightly so that extruded is no
longer a special case in boundary map construction.