Rewrite of the #204 fix to support multiline metadata
Fixes issue #408: Mongoose server not killed properly
IsMetadataArgument(): add some more exit conditions
Merge pull request #389 from Gama11/MetadataShorteningMultiline

Rewrite of the #204 fix to support multiline metadata