Fix slowdown of server/ unittests and prevent possible flaky test

Server tests were running very slowly because monitorInterval was default 0. I didn't realize that variable blocks are run before all init blocks. Since heartbeatInterval is only set in the init block of rpc/client.go, it was only 0 when monitorInterval was being evaluated.

With the monitorInterval now in the init block, the complier is smart enough to set heartbeatInterval before setting monitorInterval, because of the dependency.