FIX: a user should explicitly update timestamps

So far the library updates receive and transmit timestamps
automatically. This caused libtrading to have tons of
clock-related calls which deteriorates library performance.

Instead of constantly updating timestamps we allow a user
to chose time-granularity. In other words, we introduce
a function fix_session_time_update() which is to be called
explicitly and which updates timestamps accordingly.

master:

$ ./tools/fix/fix_client -m order -n 100000 -h localhost -p 9000
Client Logon OK
Messages sent: 100000
Round-trip time: min/avg/max = 18.0/18.6/1017.0 μs
Client Logout OK

this patch applied:

$ ./tools/fix/fix_client -m order -n 100000 -h localhost -p 9000
Client Logon OK
Messages sent: 100000
Round-trip time: min/avg/max = 16.0/17.3/2489.0 μs
Client Logout OK

We save ~ 1.5 microseconds in average.

Signed-off-by: Marat Stanichenko <mstanichenko@gmail.com>
Signed-off-by: Pekka Enberg <penberg@iki.fi>
FIX: Integer to string conversion optimizations

The patch introduces an optimized version of integer
to string function representation. The idea is to lookup
through a static array if an integer is relatively small.
In particular this implementation considers the number to
be small if it is less than 100. Such a lookup array also
decreases the number of divisions that are needed to obtain
decimal representation (instead of dividing the number by 10
we have a series of divisions by 100).

We assume that unsigned integers are 4 bytes long.

Signed-off-by: Marat Stanichenko <mstanichenko@gmail.com>
Signed-off-by: Pekka Enberg <penberg@iki.fi>
FIX engine RTT is now 16 μs

The effect of commit 3e79082 ("FIX: Integer to string conversion
optimizations"), commit abc29d4 ("FIX: a user should explicitly update
timestamps"), and commit ab83107 ("FIX: Switch to sendmsg()") combined
is that average message round-trip time for FIX engine localhost tests
is 16 μs.

Signed-off-by: Pekka Enberg <penberg@iki.fi>