Clean up image build script

This change allows the image build script to support the existing
jobs that build images for distribution, as well as future jobs that
build the image within devstack for testing.

Change-Id: I6cae0ce336fde872678fafe6ba2b31af465944a1