Enable memcached installation from source

This pull request enables compilation of memcached from source. A prefix for the compilation path can also be set. 
I accidentally specified my master branch for the pull request. I've created this branch now. Please pull from here.