WIP:New function for brain extraction and foreground segmentation

Hello guys,

In most of our examples we need to mask the background and for the time being we either mask with a small threshold or we use fsl-bet. Which is a bit silly considering how simple it is to make a simple histogram-based segmentation algorithm. Actually, this already existed in nipy from which I copied and updated this code. Because we really don't use nipy for anything else. I thought it would be stupid to depend on nipy only for one function. Furthermore, t will be nice in the future to have additional options to this function for example to include priors for head model etc.

Enjoy!