Rewrite pagination functions

Remove global variable $page from pagination functions, refactor
them and add inline documentation.
Remove global variable $page from prepare_menu func
Remove global variable $page from set_form_date func
Remove global variable $page from setup_redirect_links func
Do not use global variable $errors in verifyparam_groupid func
Do not use global variable $dbversion

Replace $dbversion global variable with DB_VERSION constant
Do not use $featuresversion global variable

Replace $featuresversion global var with FEATURES_VERSION constant
Do not use $version global variable

Replace $version global var with MIBEW_VERSION constant