python: added caching of virtualenvs

Implements #3