Next bunch of fixups

Another massive pull request:
- many compiler warnings removed
- some 64/32-bit compatibility bugs fixed
- HTML errors in the documentation fixed
- reduced startup delay
- code cleanups
- a preliminary INSTALL file added

There is still at least one 64/32-bit problem in the code (fortunately GCC give warnings about them). Valgrind also reports some memory errors.

I will look at these issues after two weeks after returning from holidays.

Hope this helps,
Piotr