Move encodeTimestamps into batman.rails

Previously we only had this in Shopify. I don't know why. That was dumb. Now it's public. Hooray!