ENH: Added binary_mask as input parameter for grid3d

This is the a mechanism that I came up with for masking
bad regions of images that I think @tacaswell will agree with.
The other approach would require masking before process_to_q.  If
we go down that route, then process_to_q will need to take in the
image stack again.
@tacaswell help!  This line will not work because q.shape is (N, 4) and binary_mask.shape is (N,).  One option that I can think of would be to ravel q so that its shape is (Nx4) and then ravel the binary mask and then repeat it thee more times so its shape is also (Nx4), then multiply the two massive lists, get the non-zero values and reshape it into the Nx4 array.  Is there a more 'pythonic' way to do that?  Or better yet, is there a more pythonic way to solve thsi problem?