timestamp performance improvement

- The `Timestamp#to_json` method was very very slow, this fix improves json serialization performance. 
- Also added a cleanup and performance improvement to `Event#to_s`
@electrical once we create a timestamp instance we never change it, if we
need to update the date we create a new instance of the timestamp class
with a new date. The class instance is immutable.
On Dec 5, 2014 4:52 AM, "Richard Pijnenburg" <notifications@github.com>
wrote:

> In lib/logstash/timestamp.rb:
>
> >      end
> >      alias_method :inspect, :to_json
> >
> >      def to_iso8601
> > -      @time.iso8601(ISO8601_PRECISION)
> > +      @iso8601 ||= @time.iso8601(ISO8601_PRECISION)
>
> What about the date filter? that one updates the timestamp right? or am i
> understanding it wrong?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/elasticsearch/logstash/pull/2179/files#r21363649>.
>