Singular hypersurfaces and thin shells in general relativity