Implemented CSRF token for forms and changed rendernote usage

I have implemented a CSRF token form input.
Please can someone carefully check that this implementation is secure.
I have also changed the implementation of rendernote, so that Form calls an inputs own rendernote method, so that you can override the rendernote method if needed.