So far AVCodecContext was created without codec specified.
This causes internal data to not be initialized to defaults.
This commit postpone context creation until all information is gathered.
Partially fixes#1275
This commit doesn't change any existing logic.
It moves ffserver configuration related code to separate file.
It intends to make maintaining easier.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>