Extract into functions the behaviors of clean_email and clean_link_id.
Extract into functions the behaviors of clean_email and clean_link_id.

There are places around the code where we want to make use of these
behaviors but aren't necessarily in the presumed place of being in a
form with a field of the right name and everything else that seems
to be required.

This change also includes lint and style fixes to the file.

rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son