Gov. Hassan visits troubled Newmarket school building