In what is shaping up as an academic Battle of the Titans — one that offers vast new learning opportunities for students around the world — Harvard and the Massachusetts Institute of Technology on Wednesday announced a new nonprofit partnership, known as edX, to offer free online courses from both universities.