Feature/rails3 remove documents

Implements core removal part of issues https://www.openproject.org/issues/1632, https://www.openproject.org/issues/1633, https://www.openproject.org/issues/1634