The online retail giant was once blamed for driving local shopping malls out of business. Now, it has its eyes on reinventing them.