The director of the British Museum says he will step down after admitting to failings in an investigation into the theft of items from its collection.