Removed a bunch of build warnings

I fixed those warnings that were easy to fix: redundant imports, unused
variables, etc. (I might have missed some though)

The warnings I deliberately left for now are:
* In `Test.API.UpdateList`: Incomplete pattern matching (we would need
  to think a bit about error handling to fix this)
* In `Test.Utils`: `traceShowId` remains in code (we would need to think
  a bit about proper logging to fix this)
4 jobs for 430-fix-test-build-warnings in 62 minutes and 35 seconds (queued for 105 minutes and 31 seconds)
Status Job ID Name Coverage
  Cabal
passed #16362
cabal

00:26:56

 
  Stack
passed #16363
stack

00:08:11

 
  Bench
manual #16364
allowed to fail manual
bench
 
  Test
passed #16365
test

00:27:27