Extract rw_config into module, and clean it up a little.

### WHAT

Move `rw_config` into a module, and include that module in `Authlogic::ActsAsAuthentic::Base` and `Authlogic::Session::Foundation`. Tests included.

### WHY

Currently `rw_config` is defined in the 2 modules, but their implementation is slightly different. We should make this easier to understand and test it.
didn't include the `read_value` arg because it didn't seem to be used.