Define missing TAILQ functions if any TAILQ function is provided

On both Android and some build hosts, TAILQ_END is not defined.  It
doesn't seem to be a standard BSD function at all, yet libevent
depends on this.

Rather than only patch up missing TAILQ_ functions when TAILQ_FOREACH is
missing, always patch them up if we have sys/queue.h at all.

Bug: 22608897
Change-Id: I367572dbce5a6425648eed934cfec7a3060b09cb
1 file changed