Theory of linear sweep voltammetry with diffuse charge: Unsupported electrolytes, thin films, and leaky membranes