base: Allow set size to be a numpy array
Convert halo send/receives pairs into dicts

Firedrake builds halo send/receives as dicts, not lists that are empty
when nothing is to be sent or receive.  So update here as
well (convert existing list syntax into dict as appropriate).  This is
better because we iterate over the halos in python and for large
numbers of processes this might be slow.