[build] Upgrade most dependencies, and remove uneeded ones