Bestow metal foams with nanostructured surfaces via a convenient electrochemical method for improved device performance