Move graph module from lib or vendor directory to app directory.

Because not autoloading lib directory at development mode.
Fix the commits are not ordered commiter date.

It is fixed that the date label of network graph is broken.
Finding free space from the way near commit which is downward
It improves detecting an overlap of a line
A tip is made slanting.
Commits are arranged below their first parent.
Show gravatar icon on tooltip.
Fix spinach errors.
Add some tests for network graph
Fix edit team page
add link ti public area
Fix dark color bg for wiki
= preserve do was ignored for empty project page so was replaced with filter
use md-typography for note content
better event-notes typography
Make clone widget read-only
Merge pull request #3109 from hiroponz/improve-network-graph

Improve network graph
Prevent app crash if team owner removed
Add state machine gem
Add base of Event base