Three militants killed in J&K gunfight