Fix retention policy for functional and remote jobs of release builds (#473)

First patch to get the retention policy fixed for functional and remote jobs. @davehunt, can you please have a look at?