Rewrite cache dirs logick
Created by: bartoszek
Rewrite cache_dirs logic
- initialize cache_dirs with one of:
- value provided in command line -c switch
- pacman.conf provided in command line -C switch
- container pacman.conf file
- find first writable cache_dir, bind it rw, remove from cache_dirs
- extract host mirrors, find file:// ones, append to cache_dirs
- extract server url, find file:// ones, append to cache_dirs
- concatenate cache_dirs removing duplicates, bind them ro to container
- check if any extra cache_dirs was defined, append to container pacman.conf as new [options] section.
Fix #57 #58 #59