rose app-upgrade: fix HEAD broken macro pathway

When a metadata version is "HEAD" and there is one or more
upgrade macro that does not fit into the main upgrade sequence,
the attempt in the code to bypass these macros will fail with:
```
temp_list.pop(macro)
TypeError: an integer is required
```

This fixes the bug and adds some more tests.

@arjclark, please review.