Refactored the soup session (#14).

Move session related logic into own c file. Added file locking to cookie jar
file.