Added tests for codec control, erasures and basic constructors for  all the legal sampling frequencies
Added code to protect against double "free()" calls if cleanup() is manually called. Silly mistake for a seasoned C programmer :(