(bug 33304) Fix ApiQueryAllPages and old indef protections

In the query to find only protected pages, ApiQueryAllPages includes a
clause to make sure it doesn't find expired protections. But it doesn't
take into account the possibility that the protection might be an old
infinite protection where the expiry is represented as NULL instead of
'infinity'.

Note this may not close the whole bug; that remains to be determined.

Bug: 33304
Change-Id: If85591986a19bf78f7d56ad60d251fbc450ac451