Move main() out of clatd.c. am: eb92f48b1d
am: 0b175e974e

Change-Id: Ic51f7d056ae8e13397cd7004411f481b7c6f9de1