[coverity] Fix undefined behavior in left shift
[coverity] Correctly restore std::cout fmtflags

Also, only set std::boolalpha for debug output.
Make private members private
[coverity] Prevent uninitialized crypto::hasher
[coverity] 'Handle' boost::bad_pointer exception
[coverity] Handle exception in getting the time
Merge branch 'master' into coverity_scan