Restore previous behavior of Reference::makeTitle

Prior to the patch that enabled topic namespaces (02ca2823) this
method returned null on failure, re-instate that for invalid
input exceptions but not for cross-wiki or other exception types.

Bug: 68225
Change-Id: I05d73f2f5fb5b52452b313411cff99eb8440d234
Merge "Restore previous behavior of Reference::makeTitle"