zmq: parse receiver CLI opts in main

We shouldn't be parsing options from sys.argv() unless the main function
is being run.

Change-Id: Id6bae72b80ce35721f02323a7bf7713132a49ac9
Port safe parsing with minidom patches from Nova

Prevent attacks through xml entity expansion etc.

Fixes LP# 1100282

Change-Id: I391531deac122697556c282184c8f8890ea66489
Merge "zmq: parse receiver CLI opts in main"
Merge "Port safe parsing with minidom patches from Nova"