Competition between surface and strain energy during grain growth in free-standing and attached Ag and Cu films on Si substrates