Fix newline-and-indent defadvice

Could not insert newline when
* Pointer is located at beginning-of-buffer
* Pointer is located at end-of-buffer and `char-before' is open curly brace
Modify default snippet for cout