Remove the use of the LambdaCase extension

The extension is available only in GHC 7.6+, which unnecessarily
prevents compiling scotty on older versions (for example Debian Wheezy
has 7.4).

Also simplify takeMVar ... putMVar using modifyMVar.