Exploiting Node Memory for Finite-time Average Consensus over WSNs