completely removed and get_active_learn_period(_id) from libsmo
Updated sql model (enforcing referential integrity now)
Added exception message to sql error logging
Changed manual selection of LAST_INSERT_ID() to tntdb method,
repaired all the logging code
Merge commit 'be7c6d5807c09a59883a5a1356890560d10556dc'