Make estimatedhours script usable as a module

To develop and test the spreadsheet generation script make the estimated
hours script a module. Use the if __name__ == "__main__" idiom to allow
the script to be called from the command line.

Add code in web app to call the main function.