Dynamic Compensation and Investment with Limited Commitment