Preserve order of supplied bcs in Matrix

We shouldn't use a set to hold the bcs, because the iteration order may
not be the same on all processes in parallel, which might lead to
deadlocks.  Instead, just maintain the bcs in a list with deterministic
iteration order.