Barack Obama rallies to energise Democrats before US midterm elections