Joe Allen and Jordan Henderson scored the goals as Liverpool beat Olympiacos 2-0 in Steven Gerrard's testimonial at Anfield.