time: source: updated the clocksource counter type

Clock sources use a new type for their counter and counter update
members from now on; `tick_t'. The `tick_t' type is currently defined
(i.e. typedef-ed) as a `uint32_t'. A patch to handle overflows of this
counter (which occurs after 49.7 days) should arrive soon.

Signed-off-by: Michel Megens <dev@michelmegens.net>
timer: count: added clock overflow protection

Added protection for counter overflows, and more specifically system
clock overflows. If the system clock would happen to overflow, the
entire system would crash. With this patch in place, the system will
detect a clock overflow silently and handle it peacefully to ensure that
the system will keep working as intended.

Signed-off-by: Michel Megens <dev@michelmegens.net>
time: fixed up time_after and time_before

Fixed time_after and time_before to work with the new system tick type.
Since the new system tick can be any width and either be signed or
unsigned, the old

	y - x < 0

trick won't work anymore to see if the system tick as advanced a certain
point. Fixed it by redefining time_after to

	x > 0

The way time_after and time_before are supposed to be called hasn't
changed (i.e. the API is compatible).

Signed-off-by: Michel Megens <dev@michelmegens.net>
time: tick: removed a redundant spin lock.

Removed the spinlock calls in tm_get_tick. The lock wasn't required,
only the interrupts should be disabled while checking the tick count.
Added `irq_save_and_disable` and `irq_restore' in the places of
`spin_lock_irqsave' and `spin_unlock_irqrestore' respectively.

Signed-off-by: Michel Megens <dev@michelmegens.net>
tick: doc: documented the system tick

Added Doxygen comments to `sys_tick'.

Signed-off-by: Michel Megens <dev@michelmegens.net>
Merge branch 'time'

	* Removed the 64-bit atomic system tick.
	* Replaced the system tick with a integer of the type tick_t
	* Updated all tick related functions and definitions
		- time_after
		- time_before
		- tm_get_tick
		- tm_source_inc

Signed-off-by: Michel Megens <dev@michelmegens.net>

Conflicts:
	include/etaos/tick.h
time: doc: documented the new time entries

Added documentation (in doxygen style) to:

	* tm_get_tick
	* tm_source_inc
	* struct clocksource::count
	* struct clocksource::tm_update

Signed-off-by: Michel Megens <dev@michelmegens.net>
ETA/OS 2.0.5

Signed-off-by: Michel Megens <dev@michelmegens.net>