(2,2) and (0,4) supersymmetric boundary conditions in 3d N =4 theories and type IIB branes