Degradation of a water-in-salt electrolyte at graphite and Na metal electrodes from first principles