replace shift-left and shift-right tests; support more kinds of objects when converting to CBORObject