Peform version checks without a preload WML event handler

All global Lua code is run at some point before a preload WML event is
fired (apparently). Registering an event handler to run the version
check function means that the version check will tale place after all
Lua is loaded, but even without that mechansim that would still be the
case because base-loader.cfg calls wesnoth.dofile on version.lua last.

In any case, there is no benefit in running this check earlier or later,
since the game will still initialize the display before aborting if the
user chooses Quit in the [bug] dialog. The only thing we need guaranteed
is that the [bug] handler has already been registered.
Make do_bug() function local