polygons directive

This is pending the merge of issue #918 , so the amount of changes should drop significantly once it is merged.
see scopeOrModeVal in model-key.coffee