Refactored installer code

This includes following items,
* Added new class for generating sahana.conf file
* Added new class for generating .htaccess file
* Code readability and maintainability improvements