Fix #2285 : Speed optimizations for sessionproxy
Fix #2324 : Encryption level set by deluge does not match libtorrent values

The clients are using range (0-2) whereas actual bit values are (1-3)
Add a get method to config so a default value can be returned
Fix error in previous commit (b6a3161) and added test