modify C-a to smarter-move-beginning-of-line

taken from
http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/,
modify C-a (beginning of line) so that when it's pressed once will go to
the beginning of the line, pressed again will make the cursor go to
first non-whitepsace character in the line (M-m back-to-indentation)