Efficiently sampling the realizations of irregular, but linearly bounded bipartite and directed degree sequences