Refactoring and comments fixed.

 * Refactored by breaking out code and creating 2 new functions,
   insert_at_head and insert_at_tail.
 * Fixed the prototype for the function pointer comparefn which is
   to be passed in to p_linked_list_create.
 * Fixed and also added some comments.
Some minor defensive changes and commenting.

 * Made the new functions insert_at_head and insert_at_tail more
   defensive by checking the parameters passed in to them istead
   of only using assert.
 * Added a few comments.
Added tests for an an implementation of in order insertion.

 * Added functionallity for in order insertion to
   p_linked_list_add_element.
 * Other minor changes to support in order insertion.
 * Added test cases testing the new code.
Merge branch 'insert_in_order' into develop