This patch fixes various warnings related to
- cterm_write() and friends const correctnes
- 64bit pointer arithmetics - now using (u)intptr_t
- Make xpdoor example compile again

Not tested on Windows.

List of warnings fixed:

When compling sdds3:

genwrap.c: In function 'xp_randomize':
genwrap.c:304: warning: cast from pointer to integer of different size
xpprintf.c: In function 'xp_asprintf_next':
xpprintf.c:704: warning: cast from pointer to integer of different size
xpprintf.c:744: warning: cast from pointer to integer of different size
xpprintf.c:784: warning: cast from pointer to integer of different size
xpprintf.c:1089: warning: cast to pointer from integer of different size
xpprintf.c:1092: warning: cast to pointer from integer of different size
js_system.c: In function 'js_node_get':
js_system.c:1684: warning: cast from pointer to integer of different size
js_system.c: In function 'js_node_set':
js_system.c:1749: warning: cast from pointer to integer of different size
js_system.c: In function 'js_system_resolve':
js_system.c:1985: warning: cast to pointer from integer of different size
main.cpp: In function 'void sbbs_srand()':
main.cpp:297: error: cast from 'pthread*' to 'uint32_t' loses precision
gmake: *** [gcc.freebsd.amd64.obj.debug-mt/main.o] 
(having fixed this:)

ringbuf.c: In function 'RingBufWrite':
ringbuf.c:181: warning: cast from pointer to integer of different size
ringbuf.c:181: warning: cast from pointer to integer of different size
ringbuf.c: In function 'RingBufRead':
ringbuf.c:242: warning: cast from pointer to integer of different size
ringbuf.c:242: warning: cast from pointer to integer of different size
ringbuf.c: In function 'RingBufPeek':
ringbuf.c:304: warning: cast from pointer to integer of different size
ringbuf.c:304: warning: cast from pointer to integer of different size
xpprintf.c: In function 'xp_asprintf_next':
xpprintf.c:704: warning: cast from pointer to integer of different size
xpprintf.c:744: warning: cast from pointer to integer of different size
xpprintf.c:784: warning: cast from pointer to integer of different size
xpprintf.c:1089: warning: cast to pointer from integer of different size
xpprintf.c:1092: warning: cast to pointer from integer of different size

When compiling syncterm:

ooii.c: In function 'readInPix':
ooii.c:262: warning: passing argument 1 of 'cterm_write' discards qualifiers from pointer target type
ooii.c:264: warning: passing argument 1 of 'cterm_write' discards qualifiers from pointer target type
ooii.c:266: warning: passing argument 1 of 'cterm_write' discards qualifiers from pointer target type

When compiling xpdoor directory:

xpdoor.c:196: error: conflicting types for 'xpd_doorway'
xpdoor.h:137: error: previous declaration of 'xpd_doorway' was here
(having fixed this:)
gcc.freebsd.amd64.obj.debug-mt/example.o: In function `CIOLIB_main':
/usr/home/saper/sw/synchroterm/clean/src/xpdoor/example.c:10: undefined reference to `xpd_parse_dropfile'
gmake: *** [gcc.freebsd.amd64.exe.debug/example] Błąd 1

