DeepExtractor: Time-domain reconstruction of signals and glitches in gravitational wave data with deep learning