Financial frictions, occupational choice and economic inequality