Use PageContentSave rather than ArticleSave hook.

This commit also contains some refactoring which should lend itself to
increased performance.
Ignore soft-linked Maintenance.php.
Use ArticleAfterFetchContentObject hook.

No longer use deprecated ArticleAfterFetchContent hook. The new hook
requires MediaWiki 1.21 or later.
Check if content was modified before committing.
Implement config for check-redirect and magic word.

Added two new configuration variables, $wgLinkTitlesCheckRedirect and
$wgLinkTitlesEnableNoTargetMagicWord, that can be used to increase
performance. If both are overridden to be false, the target page content
will not be fetched from the database to check for redirect or the
occurrence of a magic word, which saves a lot of time.
Fix saving of modified content.

A bug caused text to be saved only if links were added by smart mode
algorithm, not by normal algorithm.
Use preg_replace_callback throughout; lazy checks.

The checks for whether a page is a potential link target or not (depending
on the absence of the __NOAUTOLINKTARGET__ magic word and if it is not a
redirect to the current page) have now been moved into the callback
functions, so that they are only performed if a page really is a candidate
for linking (i.e, its title occurs on the currently edited page).

The change resulted in a ~10-fold increase in speed.
Use WikiPage::doQuickEditContent for speed up batch.

WikiPage::doEditContent was extremely slow, because it updated link tables
etc. For batch processing, we now use WikiPage::doQuickEditContent, which is
considerably faster.
Polish maintenance script output.
Make compatible with PHP 5.3 again.

The anonymous callback functions that were handed over to
preg_replace_callback called private static methods of the LinkTitles class,
which worked fine with PHP 5.5.9, but not with PHP 5.3.3.

The functions were not turned (back) into static methods, and the callback
is given in the array form, as described in the PHP documentation.
Use GetDoubleUnderscoreIDs hook to remove magic words.

Prevously, the magic words were removed by hooking onto ParserBeforeTidy.
Since the Parser class provides its own mechanism for removing magic words
that are surrounded by double underscores, we now use this (undocumented)
hook.
Change names of private static variables.
Use typed parameters in functions.
Use typed parameters in functions.
Change signature of parseContent function.

To be able to use the InternalParseBeforeLinks hook (to be implemented), a
different signature was needed. This entailed subsequent changes to calling
functions.
Fix SpecialPage::process signature.
Implement InternalParseBeforeLinks hook.

This replaces the ArticleAfterFetchContent hook and enables the extension to
parse output produced by templates for links.
Fix page black list.
Merge branch 'InternalParseBeforeLinks-hook'

Conflicts:
	LinkTitles.body.php
	SpecialLinkTitles.php
Fix return value if __NOAUTOLINKS__ is present.