[crt] TLV uses size_t instead of int and uintptr_t
[crt,rt] Remove unused macro THREADS_RUN_TIME_LIB.
[crt] Fix up prototypes.

Use (void) instead of () where appropriate.
Add missing prototypes.
Make everything static that should be static.
[crt] Remove unused variable.
[crt] Fix loss of precision warnings.

This addressed mixed usage of int/long.
Merge pull request #478 from waywardmonkeys/crt-threads-warning-fixes

Crt threads warning fixes