Improving kernel documentation and moving header files

- Moved kernel header files under new kern/include directory
  to make directory hierarchy cleaner
- Moving doxygen documentation of public functions and variables
  to header files and improving kernel documentation.
- Fixed some errors in header files
Some lock improvements
Fixed compilation errors and strange #include mistakes
Merge branch 'lock_impr'