player: remove confusing argc/argv adjustment

It's better if argc/argv always mean the same thing.
travis-ci: update Libav release

Libav 10 was released, so we can enable testing the stable Libav version
again.

FFmpeg 2.2 was also released, but since we still support 2.1.4, we stick
with the older version. This is better for testing.
stream_bluray: fix for significant memory leak

It's obvious but, since STREAM_CTRL_GET_TIME_LENGTH is called
frequently, the amount of leaked memory here is quite big.
vo_opengl: runtime icc profile switching

The changes in vo_opengl.c are merely for adding the icc options to the
set of options than can be changed with the vo_cmdline command.
stream_cdda: report track times

Report the time for each chapter (tracks are treated as chapters). This
allows us to get rid of the "old" chapter mechanism, and also behaves
better with the frontend.

This makes assumptions about the audio formats, but that format is
hardcoded anyway in the rawaudio demuxer defaults (and always was).
stream: remove old chapter handling code

Stream-level chapters (like DVD etc.) did potentially not have
timestamps for each chapter, so STREAM_CTRL_SEEK_TO_CHAPTER and
STREAM_CTRL_GET_CURRENT_CHAPTER were needed to navigate chapters. We've
switched everything to use timestamps and that seems to work, so we can
simplify the code and remove this old mechanism.
player: remove demuxer chapoter API wrappers

Instead, always use the mpctx->chapters array. Before this commit, this
array was used only for ordered chapters and such, but now it's always
populated if there are chapters.
player: remove weird separation between no chapters and 0 chapters

For some reason, it mattered whether mpctx->chapters was NULL or not,
even if mpctx->num_chapters was 0. Remove this separation; it serves no
purpose.
player: let chapter_start_time() return MP_NOPTS_VALUE for unknown times
player: handle chapter range like --start/--end

Instead of comparing the current chapter every time, set the playback
end timestamp to the chapter end. Likewise, don't execute an extra seek
for the start chapter.

Maybe we could also use the timeline facility to restrict playback to
the given chapter range, but this would be strange when using
--chapter=N to start playback at a given chapter. Then you couldn't seek
back, which is possibly not what the user wants.
player: use MP_NOPTS_VALUE as rel_time_to_abs() error value

And consistently use MP_NOPTS_VALUE as error value for the users of this
function. This is better than using -1, especially because negative
values can be valid timestamps.
dvdnav: prevent reallocation of fake highlight buffer

Since subsizes were never updated, the bitmap buffer was always
reallocated whenever mp_nav_get_highlight() called.
dvdnav: make MP_NAV_EVENT_RESET_ALL handled properly

dvdnav.c did not handle event in regular sequence. Usually this
does not make any trouble except around MP_NAV_EVENT_RESET_ALL.
Those events should be handled in regular sequence. If they're
mixed, it can make wrong result.
For instance, MP_NAV_EVENT_HIGHLIGHT right after
MP_NAV_EVENT_RESET_ALL should not be ignored but it might be
because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd
hidden.
dvdnav: check and update video resolution whenever rendering

Previous implementation updated video resolution when highlight
event was given. However, this may not work if highlight event
is given before video size is queried.
This commit adds checking routine into rendering function, too.
dvdnav: fix minor memory leak

This was usually handled at the end of the switch statement, so if
something returns from the function before that, the event has to be
freed explicitly.
vo_opengl, cocoa: allow to autoselect a color profile

This commit adds support for automatic selection of color profiles based on
the display where mpv is initialized, and automatically changes the color
profile when display is changed or the profile itself is changed from
System Preferences.

@UliZappe was responsible with the testing and implementation of a lot of this
commit, including the original implementation of `cocoa_get_icc_profile_path`
(See #594).