Snippets/Direct imagelinks to Commons

Description
Rewrites all imagelinks to head to Commons instead of the local wiki. (Also supports the secure server).

Careful: Note that this does it for all imagelinks. If your wiki still has a notable amount of images stored locally instead of Commons, this script will break links. Only use it if local uploads are disabled, or if all files were moved to Commons.