Process memory options from command line and config file uniformly.

The memory option may be passed via the "-m" command line switch,
or via the "[memory]" section in config file.

We add the process_memory_opts() routine to process both cases uniformly.

This fixes bug 1358286 ( https://bugs.launchpad.net/bugs/1358286 ).