Toughening materials with polymers in molecular-scale confinement