Returns HTML for an autocomplete selection menu.
Expects to be provided AJAX data in a format defined by jQuery UI (see 'url' option below).
By default, this expects to stores an ID value for a foreign key. If this isn't the desired
behaviour, a plain text value can be stored by setting the 'save_id' option to false.
The URL which handles the lookups needs to use the 'term' GET param to find matching values.
If 'save_id' is true, then it also needs to accept the 'id' GET param to fetch the label for the relevant id.
A call to the URL should return JSON which contains an array of hashes, each with the following keys:
- 'value': data for the text input.
- 'label': data for display in the drop-down list (if different from value).
This is used as the value if 'value' isn't specified.
- 'id': id value to save. This should only be specified if 'save_id' is true; see below.