[RJA-3023][fix] - REST request to /rest/projects/n/envs/m takes much time

Caching vm and borrowed machines attributes to reduce db interaction