Improve determining services types from names.

Trim initial components if they don't start with an '_' and drop trailing '.local' components.
Fixes #16
Also announce A records containing the IP4 addresses of the service.

The A records are emitted for all interfaces, unless interfaceIndex is used in options.
Don't re-announce services.

It is up to the browser to send a query before the TTL of a service is down to 0.
See '5.2.  Continuous Multicast DNS Querying' in rfc6762.
Add ANY to the record type enum.

ANY is needed for the responder to match on which queries to reply. Also swap
the dec<->hex mixup for AAAA record enum value.
Resend announcements after one second.

RFC 6762 8.3 requires initial service announcements to be resent at least a
second time with a 1 sec delay.
Set the cache flush bit on our announcements.

As we announce our own services, we set the cache flush bit (see rfc6762 10.2).
Add an enum for the dns record class field.
Send responses with IP TTL set to 255.

As suggested in rfc6762 11 the IP TTL should be set to 255 instead of the
default of 1 to work better with legacy systems.
Implement support for compressed labels in parsing.

Calculate the offset and continue parsing from there. Restore the offset at the
end of the label. Try to be robust when hitting bad offsets.

Update the test as it was relying on compressed label parsing not being imple-
mented. Now we stop parsing on bad offsets. Add more logging to be able to
follow whats going on. Also update the tests to only parse the expected records.
Make service_type parsing more robust and add tests.
Rework the service announcement.

Implement a state machine, that does 3 probing cycles to check if the service
name is free to use. Restart the state machine with a generated name if the name
is already taken.
Merge branch 'master' of https://github.com/ensonic/node-mdns-js into ensonic-master

Fixed Conflicts:
	lib/bufferconsumer.js
Merge branch 'ensonic-master'