Improved maximum-norm a posteriori error estimates for linear and semilinear parabolic equations