rustpkg: Allow building executables, and normalize '-' to '_'

r? @graydon 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.