Police in Bangladesh have killed a suspected militant believed to have played a key role in a July cafe attack during a raid in the capital Dhaka.