getty-generator: unify add_serial_getty() and add_container_getty()
This also makes the generator not trigger an assertion added by
1cd3c49d09bf78a2a2e4cf25cb3d388e1f08a709. If getty.ttys.container
credential contains a line prefixed with '/dev/', then the assertion
assert(!path_startswith(tty, "/dev/"));
was triggered. This drops the offending assertion, and such lines
are handled gracefully now.
Also, an empty string, "/dev/", and "/dev/pts/" (that is, a directory
without tty name) are gracefully skipped now.