require.js support. resolve #72

* wrapped entire lib in a function
* detection for node.js or AMD style laoding
* global var as a fallback
Fix perf test.

Need to bring in the event emitter.
Extract token trimming into a pipeline function.

The current implementation does not work well for non-latin based
languages.
Add lunr.Pipeline.prototype.reset.

Resets an instance of lunr.Pipeline, emptying out any added pipeline
functions. This will be useful when adding lunr language extensions.
Add Index.prototype.use for including plugins.

A plugin is just a function that is applied with the current index as
the context and the first argument.
Fix accidental globals in tests.
Re-implement lunr.Vector using linked lists.

Usign linked lists as the underlying data structure should be more
efficient when traversing the largley sparse vectors. Only dimensions
which actualy have a value will be stored and compared with each other.
Documentation for lunr.Index.prototype.use.
Add documentation for trimmer.
Document lunr.Pipeline.prototype.reset.
Update example to use require.js
Remove module exports from lunr.

This is now handled as part of the build step in the build wrappers.
Merge branch 'pr/73' into 0.5.0

Conflicts:
	Makefile
Fixup parse JSON outside of the timed section.
Tidy up Makefile

Allows paths of executables to be defined by the maker, also
automatically start a test server when making the tests.
build version 0.5.0