Import datastore options when using an encoder

If you can't pass datastore options, sometimes you can't even
use an encoder.  [FixRM #7681]
BufferRegister should be validated.

If BufferRegister is in lower-case, then gen_decoder_prefix will
return nil.  When the return value is nil, other functions like
gen_decoder() will backtrace due to a "undefined method "+" for nil"
error.  Therefore, this input should NOT be case-sensitive.

Also, if for some reason the user supplies an invalid BufferRegister,
the function should be aware of that and warn the user about the
bad input.
Merge remote-tracking branch 'wchen-r7/encoder_fixes' into rapid7