Add directory locals for Flycheck setup

Tell Flycheck to use packages from Cask, and add flycheck.el to the load
path of testsuite files.
Fix some byte compiler warnings