Reduce code duplication in Dalli::Server (Part 2)

Another patch series that tries to improve the code quality of `Dalli::Server` by reducing the amount of duplicate code.