Top US border official resigns amid discovery of inadequate conditions for migrant children