Add to_dict() method to Resource class

Commit a07b8b0b introduces a regression when running 'heat
resource-show' command because heatclient.v1.resources.Resource class
didn't implement the to_dict() method.

This commit adds unit tests for resource show and list commands. It
also removes the use of MagicMock in these tests because it introduced
a recursion issue (see https://review.openstack.org/#/c/65269/).

Change-Id: I6c4c0e293d2955c67a0240136faa2721ef2e4ffa
Closes-Bug: 1266678
Merge "Add to_dict() method to Resource class"