Some updates and fixes.

Move preEditChecks function to the Wiki class and make it a public
function.
Redirect preEditChecks from Image, User, and Page classes to the Wiki
class.
Some bug fixes pointed out by Scrutinizer.