Sort system messages in reversed chronological order, with a unit test

Fix for https://github.com/Rise-Vision/common-header/issues/393