General solutions, libraries and tests for project euler problems