Improve coverage of storing credentials in parser.Stack

Currently the trusts path is not directly tested, so add coverage
and ensure the correct credentials are stored in each case.

Related-Bug: #1247200
Conflicts:
	heat/tests/test_parser.py

(cherry picked from commit 5397e94292dcbf61778bdaf8abdd3c14be728458)
Change-Id: I0aa999e01015046946f242a9b52b484522dc6d72