Add random delay to announce timeout.

According to 9.2.6.11 of the spec the ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
timeout in addition to announceReceiptTimeoutInterval includes a random
number up to one announceInterval.

Add a new function for setting random timeout and use it in
port_set_announce_tmo().

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Drop tmtab module.

Instead of maintaining a table of precalculated values, use the
newly added set_tmo_random() function to set the delay request timeout.
It saves some memory and improves the timeout granularity, but has a
higher computational cost. It follows the requirements from section
9.5.11.2 of the spec.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Make random() more random between machines.

Include also nanoseconds from the current time in the srandom() call.
This should significantly decrease the chance of two machines using the
same random sequence.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Merge Miroslav's random PTP timeout branch.

Conflicts:
	makefile