coding standard updated to c++14, donation fixed

updated the coding standard to c++14. updated the donation code so that
it only donated on successfully staked blocks.