Adds timeouts and various fixes.

Adds the ability to set a timeout.
Fixes std::task -> std::thread.
Adds example to Cargo.toml
Adds Cargo.lock to .gitignore