Add some helper functions

Broke this out from https://github.com/rackerlabs/mimic/pull/105 so that PR can be a little smaller
This looks like something that really ought to be in the public API of `characteristic`; or at least, something that would be easily derived to this.  I haven't had a chance to see how this is being used in the other PR that supports this, but it strikes me that if we need to do this, `characteristic` is missing something - perhaps not missing this function exactly, perhaps something higher level - and you should file a bug :).