Partition of Flex-specific code into src-flex

Now supports build as Actionscript3-only or Flex library.