A Spatial Model of Voting with Endogenous Proposals: Theory and Evidence from the Chilean Senate