Coherence and entanglement in the ground state of a bosonic Josephson junction: From macroscopic Schrodinger cat states to separable Fock states