Moved SIGINT listener for main API database to end

Event listeners are executed in sequence, so we want the process.exit()
listener to happen last to allow other things to finish what they're
doing!