Fix/api v2 planning element type authorization

https://www.openproject.org/work_packages/16645

Took the chance to also clean up the controller. It used to raise ActiveRecord::RecordNotFound which doesn't make sense for a controller to make public to the user. It now renders 404 when the project or the type isn't found. 

Trivia:
[I know I've made some very poor decisions recently, but I can give you my complete assurance that my work will be back to normal. I've still got the greatest enthusiasm and confidence in the mission. And I want to help you.](http://www.imdb.com/title/tt0062622/trivia?item=qt0396925)