add support for simple factories

BUG= https://github.com/dart-lang/core-elements/issues/73
R=sigmund@google.com

Review URL: https://codereview.chromium.org//582523002