Training neural networks on software code improves their general logical reasoning and multi-step chain-of-thought capabilities