Change ThisTimeLineID to be 'static' rather than 'extern'.
This means code outside xlog.c can no longer access it. Previous
commits have removed most cases whre that was needed, and this
commit cleans up the last few. In xlogfuncs.c, there are a couple
of places that use ThisTimeLineID to obtain the current timeline;
since the code can't run in recovery, use GetWALInsertionTimeLine()
instead. And, in xlogarchive.c, XLogArchiveNotifySeg() needs to
know the relevant timeline, so have the caller pass it as an
additional argument.