core: refactor seek_chapter() function

Makes it easier to understand... maybe. It's still pretty strange how
this function may either queue the seek or seek immediately. The way
it actually works doesn't change, queuing the seek is just moved into
the function.

Also add a execute_queued_seek() function, which resets the queue state
correctly.
demux: remove retrieval chapter end time

The frontend doesn't use this.
stream: report chapter times

Note that the cache could make this excessively slow, because the
frontend asks for chapter times very often (e.g. all the time when the
OSD bar is visible). Possibly the chapters should be cached instead,
but then we'd need to detect when the chapters change.

As of now stream_dvd uses some sort of quadratic algorithm to get the
time for a chapter, but hopefully this doesn't matter.
demux: never use STREAM_CTRL_SEEK_TO_CHAPTER

This is an experiment to see whether time-based seeking is not enough
for chapter seeks.

Actually, this works much better for DVD seeking for reasons I don't
understand. Before this commit, it complained about decreasing PTS when
doing chapter seeks with DVD and demux_lavf. This suggests that the
state wasn't really reset correctly, although I couldn't find any
obvious bugs when checking the code. These warnings are gone with this
commit.

Chapter seeking behave better too, because the frontend doesn't take a
separate path and uses last_chapter_seek correctly.
demux: use double type for chapter times