Fix ct backend dialyzer warnings

* Fix unmatched return
* Fix set_loglevel call to store mask in state
* Add common_test to plt for ct:pal spec
Merge pull request #237 from fishcakez/ct_backend_dialyzer

Fix ct backend dialyzer warnings