add tests, lib folder to the consoleapp

@sethladd, add tests and a `lib/` folder to the console app.
I've done it this way for other projects so that:
- the tests for the different libraries can be run separately (one all.dart test file and n separate test libraries)
- `defineTests` is a nice description of what the method is doing; putting that in `main` conflates things a bit

In any case, happy to change this.