UN nuclear watchdog's top inspector resigns