The Boeing 737 MAX was flying from Birmingham to Tenerife when it declared a mid-air emergency and turned back to the UK.