Plugin further cleanup (aligning with https://github.com/discourse/discourse/commit/af69b78ecbb79b881f8f577ad61d69875ae9fa99 and getting ready for https://github.com/discourse/discourse/pull/2299 )