Two-fluid magnetic island dynamics in slab geometry. II. Islands interacting with resistive walls or resonant magnetic perturbations