README: Re-arrange into a more logical order

Requirements should come before build for example.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
utils: pagination: Make prev and next page wrap around

When at the beginning or end of the results pages, have the previous and
next page links link to the start and end of the pages list.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
docs/post_get: Fix a typo

handles -> handle

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
utils: Re-work array query variable handling

The functions add_avar and add_multipart_avar are for dealing with
POST/GET variables of the form avarN[name]=value see docs/post_get.

Previously these functions took a finalize parameter that was set to 0
when adding variables then a final call with it set to 1 to have the
hash table of variable/value pairs added to the avars GList. The main
reason for this was there was no way to know when we'd finished adding a
set of ralated variables to the hash table to then add to the GList.

These functions have been re-worked to make use of GQuarks to associate
variable index's with an integer value that can be used as an index
into the avars GList, we can then use this index to pull out the hash
table for a particular array variable and amend it with more values. Or
create a new hash table and add it to the GList at the same time.

This negates the need to call these functions an extra time with the
finalize paramerter set to 1. It will also now handle cases where the
array variables may be out of order. e.g previously

    avar0[colour]=blue
    avar0[code]=0000ff
    avar1[colour]=red
    avar2[color]=green
    avar1[code]=ff0000
    avar2[code]=00ff00

would have resulted in 5 GHashTables being created and added to the
avars GList instead of the correct 3. The new code will handle this and
ensure everything is correctly grouped together.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>
utils: zebra: Fix the function comment

There was an incorrect comment left over from commit 8ae642 ("Replace
the use of libctemplate with libflate"). Fix it up.

Signed-off-by: Andrew Clayton <andrew@digital-domain.net>