Added rate cost to SAO mode selection calculations

Decreased BD-rate 1% on LP configuration with 600 frames of BQMall, QP 22,27,32,37
Merge check is now performed in a function to ease the checking
lib: Add a public version include
bitstream: Add correct header for htonl
config: Fix config_alloc prototype
config: Set static copy_string

It is used only within the file.
build: Add more cflags to the Makefile
global: Use defined() in macro checks
whitespace: Drop trailing spaces
encoder: Staticize functions
picture: Staticize
sao: Staticize
rdo: Staticize
sao: Drop unused variable
sao: Constantize *_list
search: Staticize functions
transform: Fix function prototypes
transform: Staticize
Drop clang-compatible flag
search: Conditionally compile conditionally used functions
transform: Drop now-unused variables