addAction use generic; fix bugs;

[old] addAction(action: MZ.Action, settingAction: ((MZ.Action)->())?)
-> MZ.Action
[new] addAction<T: MZ.Action>(action: T, settingAction: ((T)->())?) -> T