Reset net state before running tests; added isServer test; improved net.dispose test