F/msg warning refactor

This branch introduces msg_warning_once() to be used by the system() source. In addition to introducing the new macro, this series also refactors all potential use-sites to use it.

This branch is based on f/template-related-refactors, although it can probably be rebased to a different commit easily.