findHooks.php, importSiteScripts.php: Use format=json

* Also added query continuation support to findHooks.php.
* Also fixed query continuation support in importSiteScripts.php
  (broken by 2b3f4d821cd4).

Change-Id: I7ef62d370f5e2f598ac4c5857ac0dbf3ee4c8fa2