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.