A Model of Rationing and Labour Supply: Theory and Estimation