Refs #10: avoid gvwstate.file to interfere with unit tests
1. move vst.write_file from pc_proto.cpp to pc.cpp
2. add pc.save_prim to control save prim component or not.
Refs #10: remove pc.save_prim and make pc.recovery to control write state file or not
Refs #10: remove gvwstate.dat file if pc.recovery=0 to avoid read stale state file.
This situation could happens in following scenario.
1. node starts up with pc.recovery=1, and has state file
2. then node starts up with pc.recovery=0, so right now state file is stale.
3. then node starts up with pc.recovery=1 again, stale file is used.
Refs #10: fix typo
Refs #10: remove state file on graceful shutdown
Refs #10: clear rst_view when pc is formed.
otherwise it may prevents pc remerge. see case https://github.com/codership/galera/issues/47\#issuecomment-45083066
Refs #10: don not clear rst view after sending install message. otherwise if network partition happens when sending install message, restored view is lost
Refs #10: set restored view type to NON_PRIM, this could solve pc remerge problem well
Merge branch 'gh10' into 3.x