Money can't buy happiness, but it could save you from loneliness — depending on where you live.