Obama's mosque visit is designed to promote religious tolerance at a time when anti-Muslim feeling is growing in the US.