Fix for issue 102

Adding a fix for issue-102 ([1])
Also added a test case.

Fix - Currently cache is index by hash generated using encoded principal. Changed cache to index values by DN.

[1] [1] https://github.com/jglobus/JGlobus/issues/102