Wavefront dislocations in the Aharonov-Bohm effect and its water wave analogue