container: add some helper functions for restart policies