[FIX]: site in the job definition is taken into account when submitting

Porting back from v6r8 (tested)
save
CHANGE: Get the allowed plugins from the CS
Under Transformations/AllowedPlugins. Needed for adding a user specific
plugin.
FIX: removed continue that was exiting the loop
FIX: added try/finally to make sure locks are ALWAYS released
FIX?: sometimes the string substitution crashes, and no idea why. This
is a small protection.
CHANGE: Remove checking of plugin validity

This is not needed, and Fed agrees.
save
FIX: replaced threading.RLock with LockRing
Back port fix from r8 wrt proxy-info showing an error when there's no CS
FIX: removed "from DIRAC.Core.Utilities.DictCache import *" from
DIRAC.Core.Utilities.__init__ and redone all import paths to be working
again.
FIX: test return code in startsess
FIX: move all functions out of the client class
FIX: remove all unused functions/methods except getReplicasNew()
FIX: ban has_key() and x in l.keys(), remove sortList usage
FIX: openSession may return 3 values (<0 if failed)
FIX: check first if we can open a session. if not, declare invalid
FIX: Check that site candidates have all the replicas
save
CHANGE: streamline usage of LFC return codes into Dirac return codes
[FIX] Just a number of fixes ported from integration to v6r7 

for v6r8 release
Merge pull request #1370 from fstagni/sitesInTaskFromJobDefv6r7

[FIX]: site in the job definition is taken into account when submitting
Merge pull request #1374 from KrzysztofCiba/fix-ta

FIX: small fix in TransferAgent