UN to investigate Turkey over detained judge