merge with upstream SConstruct, reuse shared objects
add static package
simplify headers install
install shared lib, requires scons 2.3.0

there's some file exists errors, not sure if it's something wrong in
SConsctruct or there's hack to avoid it