substr() neg offsets, new ctype_email_local(), auto_link() avoid linking email domain as handle

fix substr() neg offsets.
add new function ctype_email_local() with minimal good enough
implementation.
a few whitespace tweaks.
fix auto_link() to avoid linking email address domain name as Twitter
handle.