The BaBar detector: Upgrades, operation and performance