Extremely localized molecular orbitals: theory and applications