Ask an Immigration Solicitor. Get an Answer ASAP.
Unfortunately you cannot switch in the UK with a visitor's visa. You have to leave the UK and make your application.
You are applying for unmarried partnership visa which is under British laws and therefore you cannot switch from a visitors visa. If you are applying under EU law that is a different matter. You friend would have made an EU application
You don't need to get married to apply for extended family visa under EU law. If you have been admitted into the UK as an extended family member of an EU citizen then yes you can get married. If you are here under a tourist visa you can't.