Electronic structure and magnetism in doped semiconducting half-Heusler compounds