headers: mirror numbering of Unix stdio

Change the order of the message header types so that STDIN is 0, STDOUT
is 1 and STDERR is 3.