Boroughbridge High School agrees to close sixth form