Fixed wrong stream check when body is null
Fixed access to virtual properties in mongoose resources
Move rest module to separate library