Added preliminary support for multiple reference frames

L0 reference list is being updated and sent to bitstream but actual usage of other than default reference might break something.
Fix intra reconstruction on the bottom of the frame.

When the CU was both at the bottom of frame and at the bottom of LCU,
uninitialized pixels were being used as reference.
Simplify intra reference border construction.

Doesn't change anything but makes the control flow more clear.
Fix compiler warnings for VS2010 /W4 in intra.c.

- Working towards issue #11.
Remove debug module.

- It hasn't been very useful lately and I don't want to maintain it.
Fix compiler warnings for VS2010 /W4 in picture.c.

- Working towards issue #11.
Fix compiler warnings for VS2010 /W4 in nal.c.

- Working towards issue #11.
- Removed todo about luma margin. The code should work even with margin.
Fix some compiler warnings for VS2010 /W4 in encoder.c.

- Working towards issue #11.
- There is a lot in this module so I'm fixing only ~half in this commit.
Fix compiler warnings for VS2010 /W4 in nal.c.

- Working towards issue #11.
- Leaving this as a separate commit in case there is a regression.
Fixed array overflow causing segfault, fixes #17

Should also solve issue #16
Thanks to ps-auxw @ IRC for finding this stupid bug!
Added init value for encoder->ref_list to fix valgrind warnings

This might help with issue #16
Thanks again to ps-auxw for pointing this out ;)