Fix coding style

Move the invocation (jQuery) into the parens that contain the function.
Use consistent style for IIFEs.
First use of docs/specs
Fixed spelling mistakes.
Since no db-specific conversions are done, use get_prep_*().

These are general data-preparation requirements, and don't handle anything
database backend-specific.

The prototypes changed in Django 1.2 and the old ones are deprecated since
Django 1.4:
https://docs.djangoproject.com/en/dev/releases/1.2/#get-db-prep-methods-on-field
Use intersphinx link for toolkit
Minor changes in API specs docs
Added docstring and extra comment.
Document purpose of django segment role def