Remember optionalManifest fields

I thought this was supposed to be handled by the Jelly script just like the fields above, but somehow it does not work, so I did it manually. The Jenkins Maven plugin works this way too so this is probably the official way.
Minor code cleanups
Check if app already exists, and update instead of create