IBM is pouring money into its new Internet of Things unit — and it’s doing it at just the right time.