Clone template flock

Fixes lp:1311668

Use flock to serialise lxc template creation rather than juju/utils/fslock
Should not be doing this if flockUnlock returns an error. I think defer is unnecessary here; just call flockUnlock, check the result, and then close or not.