sync: Add CTimeoutCondition

A condition that can wait for a specified timeout, this is useful when
it is known in advance that events have to be processed at some time in the
future.
net: add StartThreads and StopThreads signals

This allows modules to maintain their own threads.
net: Better inventory request management