Add, document and test hard_sigmoid.
Fix doc indentation. They are part of their section, not at the global scope.