Add support for prerelease identifiers

Includes proper handling for incrementing and changing the prerelease
identifier simultaneously. Ex:

  inc(version, 'pre', 'dev')

  1.2.3-dev.0            -> 1.2.3-dev.1
  1.2.3-dev              -> 1.2.3-dev.0
  1.2.3-alpha.0          -> 1.2.3-dev.0
  1.2.3-alpha.0.beta     -> 1.2.3-dev.0
  1.2.3-alpha.10.0.beta  -> 1.2.3-dev.0
inc(pre,id): Only put a single .0 after the id when non-numeric