Fixed incorrect next timeout calculation.

Previously the next time interval could be set to RTT timeout for
a block (when the block needs to be resent). But when this comes
faster than the write rate computed by Chicago algorithm, such a
premature sendq processing would cause spinning. So we allow a
fast resend only when any acknowledgements are pending as ACKs may
be sent together with blocks faster than the write rate.
Force C linkage under a C++ compiler.

This enables easy use of libcurvecpr in C++ bindings.
Merge branch 'master' of https://github.com/kostko/libcurvecpr into bug/8, refs #8
Merge branch 'bug/8', refs #8