Task Discretion, Labor Market Frictions and Entrepreneurship