Report out-of-space, not patch-invalid

If there isn't enough space on the filesystem to upload a patch (which can take
2-3 times the size of the patch, because of multiple copies and gpg signature
checking), we should fail with an Out_of_space exception. Before, if the gpg
check failed because there wasn't enough space to write the unsigned cleartext,
we would erroneously report patch_invalid. Now we check that there is enough
free space to signature check the patch (we make a guess of 2 * size of the
patch), and catch Unix.ENOSPC exceptions and handle them accordingly.

CA-124008

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit 412b60bea61397a77a1c799077d2bcda97fd60b0)
Whitespace fix for get_patch_to_local

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit da0ea340497401cca7b85948895b50a035c6cade)
assert_space_available takes optional multiplier arg

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit 76fb912e0700e432f66c427152ac11a98d714222)
get_patch_to_local checks filesystem space on slave

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit 6ad1df6ddcaa849c158c7c93d8517c871a2e2346)
mkdir -p /var/patch, which might not be there

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit 948fea1b80e710c49c963e83b23349447c3efd57)
whitespace: spaces to tabs

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
(cherry picked from commit 4cb25e071d8d31e25947d2b1ac638233a170cefa)
Fix value in warning of space too small to unpack hotfix patch.
Previously the multiplier was not taken into account when reporting
details in the warning message.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
(cherry picked from commit 19e80a016b41d4aa6ac60e050601056730dde1cb)
Merge pull request #1848 from kaifengz/CA-124008

CA124008, HFX-1226: Report out-of-space, not patch-invalid