Lending refactor step 1 - moved all functions to find if a book is loaned out to core/lending.py
Lending refactor step 2: moved more lending functions to core/lending.py
lending refactor 3 - first steps towards moving loans to IA.
Always update ebooks/<identifier> when updating waitinglist of a book.
Fixed IA lending API URL.