Is it possible to use a single template that I can load the mirage client and view client on. So that the machine can go either mirage (offline) or use horizon view (online)?
Yes, you can use the same Gold Image to create your VDI images (View) and your Reference CVD's (Mirage). The less master images you have, the better, in terms of manageability (In my opinion, of course. Your use case may vary.)
is there any integration with mirage and horizon view? can the image have both mirage agent and horizon view agent?
While the two products are not 100% integrated, they are interoperable. You can find a blog post on how to setup View desktops managed by Mirage:
Do directly answer your question, yes the image can have both agents.
any idea what this setting is in horizon view for?
There is a global setting (for all pools in the view pod) where you can specify which Mirage server to use for configuration settings. What this setting in the individual pool is for is to override that Mirage server in the Global Settings (in favor of another one) for just this 1 pool.