With a nil value for dotspacemacs-switch-to-buffer-prefers-purpose,
switch-to-buffer prefers using the current window, same as vanilla
Emacs. With a non-nil value, switch-to-buffer prefers another window
with the same purpose as the buffer. This affects actions like
spacemacs/alternate-buffer, and opening buffers from Dired.
Also remove the check on purpose-mode. Using the purpose layer without
purpose-mode does not make sense so I prefer to throw an error is such
case happens.
Update README.org and add spacemacs-purpose layer to spacemacs
distribution.
Move functions of the layer to funcs.el and prefix variables and
functions introduced by the layer with `spacemacs`.