refactor generation of per project media lists

* use globalimagelinks table for remote media lists
* fix running on one wiki to actually only run on that one
* toss all the redirect and dict crap, unneeded now
* rename functions to what they do (writeLocalMedia,
  writeRemoteMedia), clean up option names, usage

Change-Id: Ifa8c877de7b64a0cb84b0a0f326836e78feca8dd