Kalashnikov’s famed AK-47 was initially plagued with reliability problems. Here’s how it overcame them to earn a reputation for reliable performance.