Fix bug in upgrade test

oldID is converted to a string. Which is different to the the bytes
version stored in the document.
Merge branch 'master' of https://github.com/juju/juju into fix-upgrade-bug
Merge pull request #1038 from waigani/fix-upgrade-bug

Fix upgrade bug