Derivatives of annulated tetrahydroazocines and tetrahydroazonines as cholinesterase inhibitors