Coercivity of granular ferromagnetic films and related multilayer structures