rustpkg: allow compiling executables as well as libraries

Also, treat '-' and '_' as interchangeable in package names.
rustpkg: Allow building executables, and normalize '-' to '_'

First, don't assume that all crates are library crates; use the
parser to determine whether a potential crate has a `main` function.

Second, normalize any hyphens that appear in the package ID to
underscores.