Ignore Cargo.lock for libs in `cargo-new`

The lockfile should only be checked in for bins, not libs.

Closes #304
auto merge of #321 : alexcrichton/cargo/issue-304, r=wycats

The lockfile should only be checked in for bins, not libs.

Closes #304