what year was barack obama elected president in?