Bump version to 4.0.31.

[ci:skip]
The `passenger-status --show=xml` command should not print the non-XML preamble, such as the version number and the time. Fixes issue #1037.
Fixed some problems with spawning applications that print messages without newline during startup. Fixes issue #1039.