Fix app_glance_id() function in build-app

this needs to cater for multiple images of the same name been in glance.

Change-Id: I61034c381c7b3ddbf380efe28d82326f17b2b7da
Closes-bug: #1350649