Okay just to post the “answer” for anyone interested..
My code does work as is. There was another piece of code which interfered with my solution. So basically.. What I’ve described above works like a friggin charm if anyone needs a similar solution.
In summary what I do is:
* Use the script found here: http://detectmobilebrowsers.mobi/ to detect if a user is on a mobile
* Run the filters to change the theme and frontpage etc. before browser rendering
* If user clicks “show desktop version”. Pass a parameter “?version=desktop” in the url to the frontpage.
* In wp-config.php, I check if this parameter is set, if so I set a php session variable.
* If the session variable is set, I don’t run the previous filters
This gives me the possibility to create a completely different mobile version which in my case is used as a webapp. It uses the same wordpress installation and database but a different theme and frontpage. Awesomesauce!