BBC chairman resigns after row over loan to Boris Johnson