ReserveKeyFromKeyPool's previous behaviour is to set nIndex to -1 if the keypool is empty, OR throw an exception for technical failures. Instead, we now return nIndex (always >= 0) and throw a keypool_empty exception if the keypool is empty.
This is to ensure calling code must handle the empty case, and so the compiler can provide use-without-assignment warnings when appropriate.