Philippine police killed three detained militants linked to Islamic State after they staged a Manila jail rampage that saw a police officer stabbed and a former opposition senator held hostage.