more osx patch
osx patch from Brad Howes; other trivial code improvement
gmp2 is working now but still need more large scale testing.
code improved
to add topology unittest
auto-create client log dir
replica unittest
replica bug fix
fix replica bugs
client log support completed; more log contents to be added.