Adds a function for getting OID from RID

We need this to use the peer report data, but it also has much broader
utility.  Can be used to trim a string (or vector of strings) to the
last n characters.