Test shared mode

Add a test for shared mode.

Also fixes a bug with how the mode was being picked up by the xwalk_apkgen command line script.