QT 5 Update walletdb.cpp

Replaced “loop” variable with “LOOP” to fix Qt 5.0 conflict