Minor code cleanup: use closeSilently.

git-svn-id: https://svn.forgerock.org/openig@364 dbb9e58e-28e6-4ce0-90e8-f11d9605b710
Minor code cleanup: re-use expression functions.

git-svn-id: https://svn.forgerock.org/openig@365 dbb9e58e-28e6-4ce0-90e8-f11d9605b710