Theory of square-wave stripping voltammetry and chronoamperometry of immobilized reactants