Warwickshire seamer Chris Woakes claimed 5-63 as Lancashire were bowled out for 247 on the opening day at Old Trafford.