Misc scripts updates
tweak sql parameters for performance.
Add sql INSERT/UPDATE locks.

The SQL INSERT  statement can only be issued once, ever, for a given
atom.  Add locks to prevent two threads from trying to call it
simultaneously.
Move common scm configuration to one file.
Update the various language processing scripts.