Add a leveldb option function in io.hpp/cpp

Isolating the leveldb option to an io utility function. For some environments that do not use the default file IO, this may be helpful (see https://code.google.com/p/leveldb/source/browse/include/leveldb/env.h?r=213a68eb68ece93a8915ef18a8eba920d5a924a4#5).