Mitigating laser-imprint effects in direct-drive inertial confinement fusion implosions with an above-critical-density foam layer