use Q style wrapper; if env supports __proto__ then use prototype swap so that makeState instances are callable