Accept trailing newline characters in Base64 strings

Some client authors append a newline character to Base64 strings, e.g. in `<auth/>` packets.  Ignore such newline (and while at it, also space) characters instead of stumbling over them.