Merge pull request #1800 from iglesias/develop

Fix leak in KNN::store_model_features, duplicate increases ref count
Small refactoring:
- import modules in python_modular structure HM-SVM examples,
- doc fixes,
- if () {error message} -> REQUIRE in PrimalMosekSOSVM,
- and minor style changes.
Update gitignore with protobuf generated files