Trading Networks with Bilateral Contracts