Merge pull request #69 from branan/socket_timeout_fixup

[QE-498] Fix port_open? on linux
(QE-148) support upgrading packages
(QE-147) Add support to deploy package repositories
Only run apt-get update when it is needed

This refactors the debian packaging to make sure apt-get updates only
happen when they're needed.