Disentangling bipartite and core-periphery structure in financial networks