Recep Tayyip Erdogan is visiting Azerbaijan to mark his ally's win in the conflict with neighbouring Armenia.