Update for latest Rust and Cargo

Cargo:
  - [[lib]] -> [lib]
  - Add Cargo.lock to .gitignore

Rust:
  - Use new generalized lifetime bounds
  - Use Duration instead of int for time.