(bug 46405) Fix errors in mw.title.new( pageid )

mw.title.new( pageid ) should not throw an error for an nonexisting
pageid, just return nil. Similarly, it should always return nil for 0,
rather than returning the last non-existent title created.

Change-Id: I3cdbb24fc785aef0f8e75fba1feccd26ac5b7370
Merge "(bug 46405) Fix errors in mw.title.new( pageid )"