Studies of quark and diquark fragmentation into identified hadrons in deep inelastic muon-proton scattering