Reimplemented memset fns.

Now uses more obvious names and replaces multiple functions with a template and aliases.