Add tests for the misc.cachedproperty descriptor

Add a few tests that verify it is working as expected.

Change-Id: I6c062f84f7c2a6baf8fc9a697ebe2d715f82d332