(PE-5677) Add tests for gem cli tool.

Signed-off-by: Wayne <wayne@puppetlabs.com>
@johnduarte how likely do you think it is we will write test cases that depend on gems being installed without checking in those test cases that the required gems are installed?

If a particular puppet module needs a gem on the master that is uninstalled what is the expected behavior? Personally, I expect that that puppet would be able to recognize this and install the module it needs at that time but I'm not exactly sure in what situations it is that we need gems installed.

This teardown step is only removing the gems it installed and any leftover gems that are not required to meet any particular dependency. I intentionally used a test gem (beaker) here that I found unlikely to actually be used to avoid mistakenly uninstalling gems that might already be installed.