Quantum phases of atomic boson-fermion mixtures in optical lattices