Employers will have to offer flexible working hours - including a four-day week - to all workers under government plans.