Replace Array.reduce with simpler loop.

For https://github.com/openannotation/annotator/issues/411
Rewrite tests to not use plugin.configure
Relates to issues from https://github.com/openannotation/annotator/issues/408
Merge branch 'master' into grunt-test