Is it possible to make a plugin that scans all subjects when a folder is opened and if the subject contains something like "SPAM" then moved the e-mails to a specific folder?
You would need a server side spam filter like Dovecot's managesieve. You can then find/make a plugin for RoundCube that allow to edit the filters rules.
Does anyone know of a plugin project that is currently focusing on this?
I haven't looked through any of the code yet to verify how well these work, but there are several plugins for pretty useful functionality here: RoundCube Plugins (http://www.tehinterweb.co.uk/roundcube/#pisieverules)