Changes in lease/network api - leases should be attached when vm is stopped; fixed tests