Allow upgrade-juju to detect and clear in-progress / partially completed upgrade

Review here: http://reviews.vapour.ws/r/20/