p-adic families of cohomological modular forms for indefinite quaternion algebras and the Jacquet-Langlands correspondence