refactor the Ajax request part of server_status_monitor.php

1. split long code to function
2. move functions to server_status_monitor.lib.php