[cli] properly rewrite download-build to use APIv3
The download-build was reimplemented to APIv3 some time ago,
but with mistakes. The command wasn't working at all. This
commits finishes it.
There are also changes to tests related to download-build command.
It was necessary to use `configure_mock`, because we needed to mock
a `name` value, which is unfortunately `MagicMock`'s property used
for string representation of such object.