Allow building and installing static lib

Refactored the install rules a bit, so that installing the static
lib optionally becomes a bit more convenient.
Update VERSION in Makefiles
Install docs in version-specific directory by default

This is standard in most linux distros.