An investigation is underway after two men armed with weapons entered a mosque in Manchester.