Bi-paracontact structures and Legendre foliations