Implementation of Logical and Memory Functions with Memristor Cellular Nonlinear Networks