Add Cargo build system

This adds an idiomatic Cargo build system, and moves the executable
source to `src/main.rs`. For projects producing executables,
`src/main.rs` is the main entry point.

Use `cargo build` to build, and `cargo run` to run an executable
project.

This also amends the `.gitignore` for Cargo.
Use enclosing-scope documentation comment

This comment appropriately documents the crate, and so could be made
into a doc comment
Add crate attributes

These attributes suggest the name and type of the crate to the rust
compiler