De-duplicate PathCommand enum by moving it to the shared src/utilities.ts file

Prerequisite for using it in defineShape without duplicating it yet again.
Extract ShapePath class encapsulating all path serialization done in Graphics.ts

This way, that functionality can be reused in defineShape, and we can't have two potentially deviating implementations.
Fix bugs in resolution of initial SWF URL

Example that didn't work in the inspector before:
`../../test/swfs/some-folder/some.swf`
was resolved to
`http://host/test/test/swfs/some-folder/some.swf`
instead of
`http://host/test/swfs/some-folder/some.swf`
Port defineShape SWF tag handler to TS

This is heavily rewritten, but the hard parts about correctly joining path segments together and applying them to the different fill and line styles are pretty much unchanged. Hence, it should work pretty well.
Merge pull request #1334 from tschneidereit/nat

TS implementation of defineShape