Brad Haddin made a century as Australia A recovered from a slow start in their four-day tour match against Scotland.