First batch of changes for preparation for adoption of Avalon patterns. Only changes on logging for now. Mostly usage of LogEnabled contract interface. Separate mail follows.