Adding common security stuff

Appmaster and Container can now read hadoop's Credentials
from a token file distributed by yarn.
savepoint 1 for thrift work
tidy up