With regards to the license, they suggest you do it at least a month before the date of the wedding.
and if you just want a simple wedding in a mosque you'll have to get hold of the mosques themselves. I know the Catholic Church wanted a full years advanced warning, but we also wanted a small wedding and opted for a wedding officiant. We had the ceremony in the back yard, very small with just immediate family. We used these people:
http://www.allseasonsweddings.com/Immigration will want photos of your wedding etc etc etc as part of the relationship "proof" ... so celebrating after sending it all in causes a bit of a clash with regards to that "evidence"... but you could most likely explain that in the application and hopefully that will be okay. I'm not sure tho, someone else will have to give you more on that.