Lancashire's batsmen advanced to 239-7 on day three against Gloucestershire, well-placed to press for a third Championship victory on Saturday.