Show "Join the waiting list" link on edition and work pages.
Allow the person to borrow the book when his waiting status becomes available.  (closes #203)

Implemented a update_waitinglist function that changes the status to
"available" when the book is returned. It also adds the waiting position
and wl_size to each record so that it need not be computed on every page
visit.

The update_waitinglist function is called in the following events:
* when a book is borrowed or returned
* when a person joins or leaves a waiting list
On /account/loans page, show status as available when it is "available".