Following up on r1470904, move some tests to the where clause that I
accidentally moved to the join but didn't filter the left nodes when
that node referred to non-BASE nodes or the repository root.

Use the NULL handling of 'IS NOT' to avoid having to special case
local_relpath in multiple clauses.

* subversion/libsvn_wc/wc-metadata.sql
  (STMT_UPGRADE_31_SELECT_WCROOT_NODES): Update query

Found by: pburba


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1471744 13f79535-47bb-0310-9956-ffa450edef68