P&O has been widely criticised for sacking 800 employees – but are its actions illegal?