Add constants for LevelDB write modes.
Fix parallelism computation