add ability to read from file obj to uncompress_ploop

Add src_file argument to uncompress_ploop function,
so you can uncompress an opened file.

It's needed if you want to be sure, that input file will not
be deleted before open in uncompress_ploop.
cleanup methos arguments in template.py

There are reduntant arguments and image info retrieving in
template.py. First, there is no need to retrieve info about image,
because Driver.spawn gets it as 'image_meta' argument. Second -
PCSTemplate objects serve only for one action: create VM in parallels
SDK by given image, there is no need to split this action into
constructor and 'create_instance' method. So as a first step,
remove arguments from create_instance method and pass instance
to the constructor. And third, we can store PCSDriver instance in
constructor and then get prlsdkapi.Server from there, not from
create_instance argument.
template: cache images in create_instance

Cache images in create_instance for disk-based templates,
because further changes will need to close a file after
creating an instance.
template: introduce ImageDownloader classes

Split templates class hierarchy. There is one task, which is
not related directly to creating container from an image:
downloading image from glance to image cache.

So add ImageDownloader base class and move code, which
deals with image download and conversions to his subclasses.

There is one method fetch_to_<smth> method for each type
of image cache, but now there is only one image cache type
in form of tarred and compressed with prlcompress ploop
images. So the only 'fetch_to_lzrw' method is implemented.
template: introduce CachedImage class

Add class for handling cached images. Work for retrieving
images from cache is logically separated from creating VMs,
so move this code to separate class, which is not a child of
PCSTemplate.

Class CachedImage has one method - put_image, which downloads
an image, if it's not in cache and then copies image to the
specified destination.

Currently only cache of tarred and compressed with prlcompress
images is supported, so there is only one subclass of CachedImage -
LZRWCachedImage.

This patch doesn't change behaviour, just sort of refactoring.
template: protect image cache from concurent operations

Instance creation and manage_image_cache can be called from
different threads simultaneously. So we need to correctly
handle this case.
template: split PloopDownloader class

Instead of replacing _download_ploop method in QemuDownloader
class let's add base class BasePloopDownloader and move
fetch_to_lzrw methos there.