cmake: generate and install pkgconfig file

This installs the x265.pc into /usr/local/lib/pkgconfig/ with these contents:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: x265
Description: H.265/HEVC video encoder
Version: 0.4.1
Libs: -L${libdir} -lx265
Libs.private:  -lstdc++ -lm -lc -lpthread -lrt
Cflags: -I${includedir}

The pkg-config file is only generated and installed if CMake finds pkg-config

Q1: it seems unwise to hard-code "/lib" in a few places, what if lib64 is
used or something else?
Q2: Should x265.pc have a version number like x265-0.4.1.pc?
CSV log: Enable frame-by-frame CSV logging
api: large reorg of logging and statistics

* move all CSV logging into the encoder so API users can take advantage of it
* remove hacky global PSNR return value from x265_encoder_close
* add time and bitrate values to x265_stats_t
* remove some dead HM code
* use x265_log in the CLI
api: white-space cleanups in x265.h
api: drop _t suffix from public data types, for POSIX compatibility

x265_t was changed to x265_encoder, since x265 is too short and would collide
with our namespace.
Merge with stable
reference: cache MotionReference instances in each FrameEncoder

This prevents these structures from being allocated over and over for each frame
The source files were moved into the encoder folder where they've belonged but
couldn't live in the past because TComPicYuv needed to know their contents.
TComSlice: remove unused TComRefPicListModification
TComSlice: remove unused m_bEqualRef and helper functions
TComSlice: remove unused copySliceInfo
asm: instantiate some sad_x3 and sad_x4 functions for HEVC partitions
fix commit typo
Displaying the number of weighted P frames used in console log
encoder: fix bitrate statistic (accBits is a bit count, not byte count)
output: use 64bit file offsets to prevent overflow with 4k video
improvement TComTrQuant::getSigCtxInc by lookup table for 'cnt'
input: If Any error in reading frame from file, deactivate the thread and exit encoder gracefully
lookahead: fix reference initialization for intra prediction

buffer size of pAbove/pLeft is height+1+width = 2*cusize+1
improvement TComTrQuant::calcPatternSigCtx

1. replace width/height by size, since there are only NxN
2. use mask operatior to avoid condition and branch
improvement getSigCoeffGroupCtxInc by merge pointer calculate