The rheology of layered liquids: lamellar block copolymers and smectic liquid crystals