added Python2.6 support for OrderedDict
added non-cheating pairwise_theano impl